package zz;

import java.io.*;

public class TransferCharset {
    public static void main(String[] args) throws Exception {
        InputStreamReader isr = new InputStreamReader(new FileInputStream("C:\\Users\\Administrator\\Desktop\\gbk.txt"), "gbk");
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("C:\\Users\\Administrator\\Desktop\\gbz.txt"), "utf-8");
        int len = 0;

        char[] chars = new char[7];
        while ((len = isr.read(chars)) != -1) {
            osw.write(chars,0,len);

        }
        isr.close();
        osw.close();
    }
}
